const defaultState = {
    // MyHeader组件的key
    key:1
}

interface IAction {
    type:string;
    value?:any;
}

// esline-disable-next-line
export default (state = defaultState,action:IAction) => {
    let newState = JSON.parse(JSON.stringify(state))
    switch(action.type){
        case "changekey":
            newState.key++;
            console.log(newState.key)
            break
        default:
            break;
    }
    return newState
}